<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>下单元素模板</title>
</head>
<body>
    <div>
        <th:block th:fragment="common_variable">
            <script th:inline="javascript">
                var json = {
                    servProductList: [[${servProductList}]],
                    cityList: [[${cityList}]]
                };
            </script>
        </th:block>
    </div>

    <!-- 电话1 -->
    <div>
        <th:block th:fragment="input_Telephone1(placeholder)">
            <input class="layui-input"
                   id="telephone"
                   type="text"
                   name="telephone"
                   lay-verify="required|mobile"
                   th:placeholder="${ placeholder }"
                   autocomplete="off"
                   th:value="${orderInfo != null} ? ${orderInfo.telephone}"
                   th:disabled="${disabledFields != null} ? ${disabledFields.contains('telephone')}"
            >
        </th:block>
        <th:block th:fragment="inputOfTelephone1">
            <th:block th:replace=":: input_Telephone1('电话01')"/>
        </th:block>

        <th:block th:fragment="input_Tel(placeholder)">
            <input class="layui-input"
                   id="telephone"
                   type="text"
                   name="telephone"
                   lay-verify="required|tel"
                   th:placeholder="${ placeholder }"
                   autocomplete="off"
                   th:value="${orderInfo != null} ? ${orderInfo.telephone}"
                   th:disabled="${disabledFields != null} ? ${disabledFields.contains('telephone')}"
            >
        </th:block>
        <th:block th:fragment="inputOfTel">
            <th:block th:replace=":: input_Tel('电话01')"/>
        </th:block>


        <th:block th:fragment="inputOfTelephone1ForMember">
            <th:block th:replace=":: input_Telephone1('此处必须是生效的会员电话')"/>
        </th:block>
    </div>

    <div>
        <th:block th:fragment="inputOfUserName">
            <input class="layui-input"
                   type="text"
                   id="userName"
                   name="userName"
                   lay-verify="required|username"
                   placeholder="请输入姓名"
                   autocomplete="off"
                   maxlength="30"
                   th:value="${orderInfo != null} ? ${orderInfo.userName}"
            >
        </th:block>

        <th:block th:fragment="inputOfUserNameForSimpleAdd">
            <input class="layui-input"
                   type="text"
                   name="userName"
                   lay-verify="username"
                   placeholder="请输入姓名"
                   autocomplete="off"
                   maxlength="30"
            >
        </th:block>

        <th:block th:fragment="inputOfUserNameForMember">
            <input class="layui-input layui-disabled"
                   id="username"
                   type="text"
                   name="userName"
                   lay-verify="required"
                   placeholder="请输入姓名"
                   autocomplete="off"
                   maxlength="30"
                   readonly
                   th:value="${orderInfo != null} ? ${orderInfo.contactName}"
            >
        </th:block>

        <!-- 物流信息 -->
        <th:block th:fragment="orderPostTable">
            <div class="layui-inline">
                <label class="layui-form-label">新机物流</label>
                <div class="layui-input-inline" style="width: 212px;">
                    <input id="expressCode"  class="layui-input" placeholder="请填写快递单号" />
                </div>
                <label class="layui-form-label">快递公司</label>
                <div class="layui-inline">
                    <select id="expressCompany" lay-search>
                        <option value="">-请选择-</option>
                        <option th:each="item : ${expressCompanyList}" th:value="${item.key}" th:text="${item.value}"></option>
                    </select>
                </div>
                <div class="layui-inline">
                    <button id="addOrderPost" type="button" class="layui-btn">添加</button>
                </div>
            </div>
            <div>
                <label class="layui-form-label"></label>
                <div class="layui-inline" style="color: #d2d2d2">若需先收货，后上门服务，请填写快递单号，没有可不填</div>
            </div>
            <div>
                <label class="layui-form-label"></label>
                <div class="layui-inline">
                    <table lay-filter="orderPostTable" id="orderPostTable" class="layui-table" lay-size="sm"
                           border="0" frame="void" rules="none"></table>
                </div>
            </div>
        </th:block>
        <!-- 新机 -->
        <th:block th:fragment="newMachine">
            <div class="layui-inline">
                <table lay-filter="newMachineTable" id="newMachineTable" class="layui-table" lay-size="sm"
                       frame="void" rules="none"></table>
            </div>
        </th:block>
        <!-- 厂商配件物流 -->
        <th:block th:fragment="factoryPart">
            <div class="layui-inline">
                <table lay-filter="factoryPartTable" id="factoryPartTable" class="layui-table" lay-size="sm"
                       frame="void" rules="none"></table>
            </div>
        </th:block>
    </div>

</body>
</html>